<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #menu ul li {
            list-style-type: none;
            width: 80px;
            height: 30px;
            line-height: 30px;
            background-color:beige;
            text-align: center;
            float: left;
            margin-left: 5px;
        }

        #menu ul li.current {
            background-color: burlywood;
        }

        #menu ul li a {
            text-decoration: none;
        }
    </style>
</head>
<body>
<div id="menu">
    <ul>
        <li class="current"><a href="javascript:void(0)">首页</a></li>
        <li><a href="javascript:undefined">播客</a></li>
        <li><a href="javascript:void(0)">博客</a></li>
        <li><a href="javascript:void(0)">相册</a></li>
        <li><a href="javascript:void(0)">关于</a></li>
        <li><a href="javascript:void(0)">帮助</a></li>
    </ul>
</div>
<script>
    var div=document.getElementById("menu");
    var ul=div.firstElementChild;
    var lis=ul.children;
    for (var i=0;i<lis.length;i++){
        var li=lis[i];
        var a=li.firstElementChild;
        a.onclick= function () {
            for(var i=0;i<lis.length;i++){
                var li=lis[i];
                li.className="";
            }
            this.parentNode.className="current";
        }
    }
</script>
</body>
</html>